package de.dhbw.karlsruhe.picsim.model.actions.impl;

import de.dhbw.karlsruhe.picsim.model.actions.WriteInFileAction;
import de.dhbw.karlsruhe.picsim.model.memory.RegisterValue;
import de.dhbw.karlsruhe.picsim.util.Bits;
import org.jetbrains.annotations.NotNull;

/**
 * Created by IntelliJ IDEA.
 * User: goesen
 * Date: Apr 13, 2010
 * Time: 12:23:37 AM
 */
final class WriteInFileActionImpl implements WriteInFileAction {
    private final Bits address;
    private final RegisterValue value;

    WriteInFileActionImpl(@NotNull final Bits lowerAddressBits, @NotNull final RegisterValue value) {
        address = lowerAddressBits;
        this.value = value;
    }

    @Override
    public Bits getTargetAddress() {
        return address;
    }

    @Override
    public RegisterValue getValue() {
        return value;
    }

    @Override
    public void acceptVisitor(@NotNull final Visitor visitor) {
        visitor.visit(this);
    }
}
